<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 松红
  Date: 2016/12/8
  Time: 18:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>约战记录</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>约战平台</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="http://favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!--导入css文件（CDN与本地）-->
    <%--引入sui mobile 框架的css文件--%>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/resources/css/challenge-min.css">
    <link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
    <link rel="stylesheet" href="http://g.alicdn.com/sj/qnui/1.5.1/css/sui.min.css">

</head>

<body>
<%--------------定义主客场的变量-----------------%>
<%! String Home;
    String Away;
%>
<div class="page-group">
    <div class="page page-current">
        <header class="bar bar-nav">
            <h1 class="title">约战记录</h1>
        </header>

        <div class="content">
            <div class="buttons-tab">
                <a href="<%=request.getContextPath()%>/challenge/Challenge/receive" class="tab-link active button">待接受</a>
                <a href="<%=request.getContextPath()%>/challenge/Challenge/send" class="  button">已发送</a>
                <a href="<%=request.getContextPath()%>/challenge/Challenge/confirm" class=" button">已确认</a>
                <a href="<%=request.getContextPath()%>/challenge/Challenge/list/over" class="button">已结束</a>
            </div>
            <div class="content-block">
                <div class="tabs">
                    <div id="tab1" class="tab active">
                        <div class="content-block">
                            <c:forEach var="challenge" items="${challenge}">
                                <div class="card">
                                        <%--卡片卡卡头开始--%>
                                    <div class="card-header" style="text-align: center;">
                                            <%--当确认的状态码为1时，则为主场，反之，则为客场--%>
                                        <c:choose>
                                            <c:when test="${challenge.challengeIshome==1}">
                                                <% Home = "主";
                                                    Away = "客";%>
                                            </c:when>
                                            <c:otherwise>
                                                <% Home = "客";
                                                    Away = "主";%>
                                            </c:otherwise>
                                        </c:choose>
                                            <%--输出两支相互约战球队的队名，以及是否为主客场--%>
                                        <div style="text-align: center !important;width: 100%;">
                                                ${challenge.challengeReceivename}(<%=Home %>)
                                            <span style="color: red;font-size: larger;font-family: Helvetica, Arial, sans-serif"> VS</span>
                                                ${challenge.challengeSendname}(<%=Away %>)
                                        </div>
                                    </div>
                                        <%--卡片卡卡头结束--%>

                                        <%--卡片的中心内容开始--%>
                                    <div class="card-content">
                                        <div class="card-content-inner">
                                            <div style="float: right;">
                                                <a href="/challenge/Challenge/agree/${challenge.challengeId}"
                                                   class="sui-btn btn-large btn-primary">同意</a>
                                                <a href="/challenge/Challenge/against/${challenge.challengeId}"
                                                   class="sui-btn btn-large btn-danger">拒绝</a>
                                            </div>
                                            日期:${challenge.challengeDate}<br/>
                                            开始时间:${challenge.challengeStarttime}<br/>
                                            结束时间:${challenge.challengeEndtime}<br>
                                            地点:${challenge.challengeArea}<br/>
                                        </div>
                                    </div>
                                        <%--卡片的中心内容结束--%>
                                        <%--卡片的卡脚部分开始--%>
                                    <div class="card-footer">
                                        <span style="float: left">联系人:${challenge.challengeUser}</span>
                                        <span style="float: right"> 电话:${challenge.challengePhone}</span>
                                    </div>
                                        <%--卡片的卡脚部分结束--%>
                                </div>
                            </c:forEach>
                            <c:forEach var="challenge" items="${challengeAgainst}">
                                <div class="card">
                                        <%--卡片卡卡头开始--%>
                                    <div class="card-header" style="text-align: center;">
                                            <%--当确认的状态码为1时，则为主场，反之，则为客场--%>
                                        <c:choose>
                                            <c:when test="${challenge.challengeIshome==1}">
                                                <% Home = "主";
                                                    Away = "客";%>
                                            </c:when>
                                            <c:otherwise>
                                                <% Home = "客";
                                                    Away = "主";%>
                                            </c:otherwise>
                                        </c:choose>
                                            <%--输出两支相互约战球队的队名，以及是否为主客场--%>
                                        <div style="text-align: center !important;width: 100%;">
                                                ${challenge.challengeReceivename}(<%=Home %>)
                                            <span style="color: red;font-size: larger;font-family: Helvetica, Arial, sans-serif"> VS</span>
                                                ${challenge.challengeSendname}(<%=Away %>)
                                        </div>
                                    </div>
                                        <%--卡片卡卡头结束--%>
                                        <%--卡片的中心内容开始--%>
                                    <div class="card-content">
                                        <div class="card-content-inner">
                                            <div style="float: right;">
                                                <a href="#" class="button disabled"
                                                   style="text-decoration: none;">已拒绝</a>
                                            </div>
                                            日期:${challenge.challengeDate}<br/>
                                            开始时间:${challenge.challengeStarttime}<br/>
                                            结束时间:${challenge.challengeEndtime}<br>
                                            地点:${challenge.challengeArea}<br/>
                                        </div>
                                    </div>
                                        <%--卡片的中心内容结束--%>
                                        <%--卡片的卡脚部分开始--%>
                                    <div class="card-footer">
                                        <span style="float: left">联系人:${challenge.challengeUser}</span>
                                        <span style="float: right"> 电话:${challenge.challengePhone}</span>
                                    </div>
                                        <%--卡片的卡脚部分结束--%>
                                </div>
                            </c:forEach>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <nav class="bar bar-tab">
            <%--首页按钮--%>
            <a class="tab-item external" href="<%=request.getContextPath()%>/">
                <span class="icon icon-home"></span><%--引用css中首页图片的样式--%>
                <span class="tab-label">首页</span>
            </a>
            <%--球队简介按钮--%>
            <a class="tab-item external" href="<%=request.getContextPath()%>/team/team/list">
                <span class="icon icon-menu"></span><%--引用css中简介图片的样式--%>
                <span class="tab-label">球队</span>
            </a>
            <%--队员管理按钮--%>
            <a class="tab-item external" href="<%=request.getContextPath()%>/team/member/list">
                <span class="icon icon-card"></span><%--引用css中记录图片的样式--%>
                <span class="tab-label">队员</span>

            </a>
            <%--约战记录按钮--%>
            <a class="tab-item external active" href="<%=request.getContextPath()%>/challenge/Challenge/receive">
                <span class="icon icon-settings"></span><%--引用css中管理图片的样式--%>
                <span class="tab-label">约战</span>
            </a>
        </nav>
    </div>
</div>
<%--引入sui mobile 框架的js文件--%>
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="http://g.alicdn.com/sj/qnui/1.5.1/js/sui.min.js"></script>
<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>

</body>
</html>
